package com.jianganming.netty.long_coder;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;

public class LongToByteEncoder extends MessageToByteEncoder<Long> {

    @Override
    protected void encode(ChannelHandlerContext channelHandlerContext, Long aLong, ByteBuf
    byteBuf) throws Exception {
        System.out.println(aLong);
        byteBuf.writeLong(aLong+1000);
    }

}
